{% load i18n %}

<!-- search form begin -->
<div class="toolbar">
<form
	name="form-search-query"
	{% if in_search %}
		 action=""
	{% else %}
		 action="__search__/"
	{% endif %}
	method="POST"
>
    <input type="hidden" name="model_name" value="{{opts_model.get_meta.model_name}}" />
    <input type="hidden" name="module_name" value="{{opts_model.get_meta.module_name}}" />

    {% if error %}
        <ul class="errorlist">
            <li>
                {% ifequal error "parsing_error" %}
                    Invalid query string.
                {% endifequal %}
            </li>
        </ul>
    {% endif %}
	 <label for="id_keyword"><img src="/media/img/admin/icon_searchbox.png" alt="Search" /></label>
    {{form.query}}
    {{form.page}}
    &nbsp;
    <input class="submit" type="submit" name="search" value="{% trans "Search" %}" />
	 <a
			href="http://lucene.apache.org/java/2_4_0/queryparsersyntax.html"
		>Help on Lucene Query Syntax.</a>
    <div style="clear:both;"></div>
</form>
</div>
<!-- search form end -->

<script type="text/javascript">
setTimeout(
    function()
    {
        document.getElementById("id_query").select();
        document.getElementById("id_query").focus();
    },
    100
);
</script>
